/**
 * Created by inna.ianko on 4/18/14.
 */

var By = require('selenium-webdriver').By,
    MyPageModel = require('./mypagemodel.js');

function MyPage(driver) {
    this._ui = new MyPageModel(driver, By.tagName('html'));
}

MyPage.prototype.login = function (username, password) {
    this._ui.username.setValue(username);
    this._ui.password.setValue(password);
    return this._ui.loginButton.click();
};

module.exports = MyPage;
